package com.our.shop.system.base.service.impl;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.our.shop.system.base.dao.IBaseDAO;
import com.our.shop.system.base.service.IBaseService;
import com.our.shop.system.util.PageList;

@Service("baseService")
public class BaseService implements IBaseService {

	@Autowired
	IBaseDAO baseDAO;
	
	@Override
	public List<HashMap<String, String>> select(String sql, Object obj) {
		return baseDAO.select(sql, obj);
	}

	@Override
	public int update(String sql, Object obj) {
		return baseDAO.update(sql, obj);
	}

	@Override
	public int delete(String sql, Object obj) {
		return baseDAO.delete(sql, obj);
	}

	@Override
	public int insert(String sql, Object obj) {
		return baseDAO.insert(sql, obj);
	}

	@Override
	public PageList queryForPageList(String listStatementId,
			Object parameterObject, RowBounds pageRequest) {
		return baseDAO.queryForPageList(listStatementId, parameterObject, pageRequest);
	}
	
}
